package com.itany.corejava.day15;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class MyScanner {


    private InputStream in;

    public MyScanner(InputStream in) {
        this.in = in;
    }

    public String nextLine(){
        BufferedReader br=null;
        try{

            br=new BufferedReader(
                    new InputStreamReader(
                            in
                    )
            );

            return br.readLine();

        }catch (Exception e){
            e.printStackTrace();
        }finally{
            if(br!=null){
                try {
                    br.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return null;
    }


    public static void main(String[] args) {
        MyScanner sc=new MyScanner(System.in);
        
        String s=sc.nextLine();

        System.out.println("s = " + s);
    }
}
